package yanc.app

class Types {
    String id

    Date createDate

    Date modifyDate
    /**
     * 图片路径
     */
    String imgUrl

    String title

    Boolean status

    /**
     * 跳转链接
     */
    String url
    /*
    类型
     */
    String types
    Boolean device

    static belongsTo = [news: News]

    /**
     * 映射。
     */
    static mapping = {
        table "sys_branch"
        version false
        id(column: "id", sqlType: "varchar(128)", generator: 'assigned')
        createDate(column: "create_date", sqlType: "datetime")
        modifyDate(column: "modify_date", sqlType: "datetime")
        imgUrl(column: "img_url", sqlType: "varchar(256)")
        title(column: "title", sqlType: "varchar(64)")
        status(column: "status", sqlType: "tinyint(1)")
        url(column: "url", sqlType: "varchar(1024)")
        types(column: "types", sqlType: "varchar(5)")
        device(column: "device", sqlType: "tinyint(1)")
    }

    static constraints = {
        id(nullable: false, blank: false, unique: true)
        createDate(nullable: false, unique: false)
        modifyDate(nullable: true, unique: false)
        imgUrl(nullable: false, unique: false)
        title(nullable: false, unique: false)
        status(nullable: false, unique: false)
        url(nullable: false, unique: false)
        types(nullable: false, unique: false)
        device(nullable: false, unique: false)
    }

}
